<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ include file="/common/include/taglib.jsp"%>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Insert title here</title>

<script src="../resource/jqGrid-4.6.0/js/jquery-1.11.0.min.js"
	type="text/javascript"></script>

<script src="../resource/jqGrid-4.6.0/js/i18n/grid.locale-en.js"
	type="text/javascript"></script>
<script src="../resource/jqGrid-4.6.0/js/jquery.jqGrid.min.js"
	type="text/javascript"></script>

<link rel="stylesheet" type="text/css" media="screen"
	href="../resource/jquery-ui-1.10/css/redmond/jquery-ui-1.10.4.custom.css">
<link rel="stylesheet" type="text/css" media="screen"
	href="../resource/jqGrid-4.6.0/css/ui.jqgrid.css" />
<%--<G4Studio:import src="/demo/test/js/listwtr.js" />--%>
<script type="text/javascript">
	function setJqgridData_json() {
		console.info("setJqgrid");
		jQuery("#jqgrid_json").jqGrid({
			datatype: "json",
			method : 'POST',
			url:"test.do?reqCode=listwtrjson",
			height: "auto",
			postData:{loginuserid:parent.userid},//developer用户ID
			width : 750,
			colNames:['ID','序列号','caseName' ,'文件大小(G)','优先级','文件个数','工作类型','难易度'],
			colModel:[
				{name:'id',index:'id', width:60, sorttype:"int",width:80,hidden:true},
				{name:'id',index:'id', width:60, sorttype:"int",width:80},
				{name:'casename',index:'casename', width:60, sorttype:"int",width:120},
				{name:'filesize',index:'filesize', width:60, sorttype:"int",width:80},
				{name:'priority',index:'priority', width:100,edittype:'select',formatter:'select', editoptions:{value:"1:优先;2:中;3:一般"}},
				{name:'filenum',index:'filenum', width:100},
				{name:'worktype',index:'worktype', width:100,edittype:'select',formatter:'select', editoptions:{value:"1:nuix;2:LAW;3:DEL;4:Rel"}},
				{name:'degree',index:'degree', width:100,edittype:'select',formatter:'select', editoptions:{value:"1:易;2:中;3:难"}}
			],
			jsonReader:{
				root : "dataroot",
				records: "totalrecords",
				page: "currpage",
				total: "totalpages",
				repeatitems : false
			},
			viewrecords : true,
			multiselect: false,
			pager: '#pager2',
			rowNum:100,
			rowList:[10,20,30],
			sortname: 'no',
			caption: "任务列表"
		}).navGrid("#pager2",{edit:false,add:false,del:false});
	}
	$(document).ready(function() {
		setJqgridData_json();
	});
</script>
</head>
<body>
	<div class="fn-mb10 mc-border">
		<div class="">
			<h2>Tasks 列表</h2>
			<table id="jqgrid_json"></table>
			<div id="pager2"></div>
		</div>
	</div>
</body>
</html>